package com.atung.parking.mapper;

import com.atung.parking.entity.BusParkingIotPackage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author Administrator
 */
@Mapper
public interface BusParkingIotPackageMapper extends BaseMapper<BusParkingIotPackage> {

    @Update("UPDATE bus_parking_iot_package SET state = #{state}, stock = #{stock} WHERE id = #{id} and state=201")
    Integer updateStockById(@Param("id") Long id, @Param("state") Integer state, @Param("stock") Integer stock);
}
